<template>
<div class="bt-warning">
    <el-popover placement="top" width="166" v-model="visible">
        <p>是否要启用此行？</p>
        <div style="text-align: right; margin: 0">
            <el-button size="mini" type="text" @click="visible = false">取消</el-button>
            <el-button type="primary" size="mini" @click="Enable">确定</el-button>
        </div>
        <el-button slot="reference" type="Enable" v-if="_SHOWBTN(showBetCode)">启用</el-button>
    </el-popover>
</div>
</template>

<script>
export default {
    data() {
        return {
            visible: false,
        };
    },
    props: ["row", "GetEnable", "showBetCode"],
    methods: {
        Enable() {
            this.visible = false;
            this.GetEnable({
                id: this.row.id,
                picCode: this.row.picCode,
            });
        },
    },
};
</script>

<style lang="less" scoped>
/deep/.el-button--Enable {
    width: 60px;
    height: 28px;
    background: rgba(82, 196, 26, 1);
    border-radius: 4px;
    color: white;
    padding: 0;
    margin-right: 20px;
}
</style>
